package ru.ipo.dces.server;

public class ServerFailReason {
    public static enum ServerExceptionType {
        ServerReturnedError,
        GeneralRequestFailureException,
        ConnectionError
    }

    private ServerExceptionType exceptionType;
    private Exception exception; //TODO don't use exceptions

    public ServerFailReason(Exception e, ServerExceptionType type) {
        exception = e;
        exceptionType = type;
    }

    public ServerExceptionType getExceptionType() {
        return exceptionType;
    }

    public String getMessage() {
        return exception.getMessage();
    }
}
